package com.ley.yikang.service.serviceimpl;

import com.ley.yikang.entity.CheckType;
import com.ley.yikang.mapper.CheckTypeMapper;
import com.ley.yikang.service.CheckTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CheckTypeServiceImpl implements CheckTypeService {
    private final CheckTypeMapper checkTypeMapper;

    @Autowired
    public CheckTypeServiceImpl(CheckTypeMapper checkTypeMapper) {
        this.checkTypeMapper = checkTypeMapper;
    }

    @Override
    public List<CheckType> getCheckType() {
        return checkTypeMapper.getCheckType();
    }

    @Override
    public void addCheckType(CheckType checkType) {
        checkTypeMapper.addCheckType(checkType);
    }

    @Override
    public CheckType findCheckTypeByName(String name) {
        return checkTypeMapper.findCheckTypeByName(name);
    }

    @Override
    public CheckType findCheckTypeById(int id) {
        return checkTypeMapper.findCheckTypeById(id);
    }

    @Override
    public void delCheckType(int id) {
        checkTypeMapper.delCheckType(id);
    }

    @Override
    public void updateCheckType(CheckType checkType) {
        checkTypeMapper.updateCheckType(checkType);
    }
}
